# Computation of the Shannon entropy
Se_beta(2, 4)
delta <- c(1.2, 3)
# Computation of the Rényi entropy
re_beta(2, 4, delta)
# Computation of the Havrda and Charvat entropy
hce_beta(2, 4, delta)
# Computation of the Arimoto entropy
ae_beta(2, 4, delta)
# A graphic presentation of the Havrda and Charvat entropy (HCE)
library(ggplot2)
delta <- c(0.2, 0.3, 0.5, 0.8, 1.2, 1.5, 2.5, 3, 3.5)
hce_beta(2, 1.2, delta)
z <- hce_beta(2, 1.2, delta)
dat <- data.frame(x = delta , HCE = z)
p_hce <- ggplot(dat, aes(x = delta, y = HCE)) + geom_line()
plot <- p_hce + ggtitle(expression(alpha == 2~~beta == 1.2))
Run the code above in your browser using DataLab